<style scoped>
.apple-table-wrapper {
  overflow-x: auto;
  border-radius: var(--card-border-radius);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--animation-speed-medium) cubic-bezier(0.33, 1, 0.68, 1);
}

.dark-mode .apple-table-wrapper {
  background-color: rgba(44, 44, 46, 0.8);
  box-shadow: var(--shadow-sm-dark);
}

.apple-table-wrapper:hover {
  box-shadow: var(--shadow-md);
}

.dark-mode .apple-table-wrapper:hover {
  box-shadow: var(--shadow-md-dark);
}

.apple-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.apple-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(250, 250, 252, 0.95));
  color: var(--apple-text-primary-light);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--apple-border-light);
  transition: background-color var(--animation-speed-medium);
}

.dark-mode .apple-table thead th {
  background: linear-gradient(to right, rgba(44, 44, 46, 0.95), rgba(30, 30, 32, 0.95));
  color: var(--apple-text-primary-dark);
  border-bottom: 2px solid var(--apple-border-dark);
}

.apple-table tbody tr {
  transition: background-color var(--animation-speed-fast), transform var(--animation-speed-fast) cubic-bezier(0.33, 1, 0.68, 1);
}

.apple-table tbody tr:nth-child(even) {
  background-color: rgba(250, 250, 252, 0.5);
}

.dark-mode .apple-table tbody tr:nth-child(even) {
  background-color: rgba(30, 30, 32, 0.5);
}

.apple-table tbody tr:hover {
  background-color: rgba(0, 122, 255, 0.05);
  transform: translateY(-2px);
}

.dark-mode .apple-table tbody tr:hover {
  background-color: rgba(10, 132, 255, 0.1);
}

.apple-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--apple-border-light);
  color: var(--apple-text-primary-light);
  transition: all var(--animation-speed-fast);
}

.dark-mode .apple-table td {
  border-bottom: 1px solid var(--apple-border-dark);
  color: var(--apple-text-primary-dark);
}

.apple-table tbody tr:last-child td {
  border-bottom: none;
}

.apple-table td.actions {
  width: 120px;
  text-align: right;
  white-space: nowrap;
}

.apple-table .action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--button-border-radius);
  border: none;
  background-color: transparent;
  color: var(--apple-text-secondary-light);
  cursor: pointer;
  transition: all var(--animation-speed-fast) cubic-bezier(0.33, 1, 0.68, 1);
  margin-left: 4px;
  position: relative;
  overflow: hidden;
}

.apple-table .action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.apple-table .action-button:hover::before {
  left: 100%;
}

.dark-mode .apple-table .action-button {
  color: var(--apple-text-secondary-dark);
}

.apple-table .action-button:hover {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
  transform: translateY(-2px);
}

.dark-mode .apple-table .action-button:hover {
  background-color: rgba(10, 132, 255, 0.2);
  color: var(--apple-blue-dark);
}

.apple-table .action-button.edit:hover {
  background-color: rgba(0, 122, 255, 0.1);
  color: var(--apple-blue);
}

.apple-table .action-button.delete:hover {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--apple-red);
}

.dark-mode .apple-table .action-button.edit:hover {
  background-color: rgba(10, 132, 255, 0.2);
  color: var(--apple-blue-dark);
}

.dark-mode .apple-table .action-button.delete:hover {
  background-color: rgba(255, 69, 58, 0.2);
  color: var(--apple-red-dark);
}

.apple-table .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.apple-table .status-badge.active {
  background-color: rgba(52, 199, 89, 0.1);
  color: var(--apple-green);
}

.apple-table .status-badge.inactive {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--apple-red);
}

.apple-table .status-badge.pending {
  background-color: rgba(255, 149, 0, 0.1);
  color: var(--apple-orange);
}

.dark-mode .apple-table .status-badge.active {
  background-color: rgba(48, 209, 88, 0.2);
  color: var(--apple-green-dark);
}

.dark-mode .apple-table .status-badge.inactive {
  background-color: rgba(255, 69, 58, 0.2);
  color: var(--apple-red-dark);
}

.dark-mode .apple-table .status-badge.pending {
  background-color: rgba(255, 159, 10, 0.2);
  color: var(--apple-orange-dark);
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  color: var(--apple-text-tertiary-light);
  opacity: 0.6;
}

.dark-mode .empty-icon {
  color: var(--apple-text-tertiary-dark);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--apple-text-secondary-light);
}

.dark-mode .empty-title {
  color: var(--apple-text-secondary-dark);
}

.empty-description {
  font-size: 14px;
  color: var(--apple-text-tertiary-light);
  margin-bottom: 24px;
  max-width: 400px;
}

.dark-mode .empty-description {
  color: var(--apple-text-tertiary-dark);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--apple-border-light);
}

.dark-mode .pagination {
  border-top: 1px solid var(--apple-border-dark);
}

.page-info {
  font-size: 14px;
  color: var(--apple-text-secondary-light);
}

.dark-mode .page-info {
  color: var(--apple-text-secondary-dark);
}

.page-buttons {
  display: flex;
  gap: 8px;
}

.page-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--button-border-radius);
  border: 1px solid var(--apple-border-light);
  background-color: transparent;
  color: var(--apple-text-primary-light);
  cursor: pointer;
  transition: all var(--animation-speed-fast) cubic-bezier(0.33, 1, 0.68, 1);
  font-size: 14px;
}

.dark-mode .page-button {
  border: 1px solid var(--apple-border-dark);
  color: var(--apple-text-primary-dark);
}

.page-button:hover {
  background-color: rgba(0, 122, 255, 0.1);
  border-color: var(--apple-blue);
  color: var(--apple-blue);
  transform: translateY(-2px);
}

.dark-mode .page-button:hover {
  background-color: rgba(10, 132, 255, 0.1);
  border-color: var(--apple-blue-dark);
  color: var(--apple-blue-dark);
}

.page-button.active {
  background: linear-gradient(135deg, var(--apple-blue), #0062cc);
  border-color: var(--apple-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.dark-mode .page-button.active {
  background: linear-gradient(135deg, var(--apple-blue-dark), #0A84FF);
  border-color: var(--apple-blue-dark);
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.page-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 加载动画 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  backdrop-filter: blur(2px);
  border-radius: var(--card-border-radius);
}

.dark-mode .loading-overlay {
  background-color: rgba(28, 28, 30, 0.7);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--apple-blue);
  animation: spin 1s ease-in-out infinite;
}

.dark-mode .loading-spinner {
  border: 3px solid rgba(10, 132, 255, 0.1);
  border-top-color: var(--apple-blue-dark);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 表格响应式 */
@media (max-width: 768px) {
  .apple-table thead th,
  .apple-table td {
    padding: 12px;
  }
  
  .apple-table .hide-on-mobile {
    display: none;
  }
}
</style> 